//註冊路由
import { Application } from "express";
import routers from "./router";
import callbackFn from '@utils/callback'

//
import { Router } from "express";
import express from "express";

export default (app: Application) => {
  for (let router of routers) {
    //app.use(url,router)
    //console.log(router.url);
    //將所有路由都進行註冊
    const Router: Router = express.Router();
    app.use(router.url, router.fn(Router,callbackFn));
  }
};
